[SPARK-6364] [MLlib] Implement equals and hashcode for Matrix#5081
[SPARK-6364] [MLlib] Implement equals and hashcode for Matrix#5081MechCoder wants to merge 2 commits intoapache:masterfrom
Conversation
|
cc @mengxr . Please review. |
|
|
Test build #28781 has finished for PR 5081 at commit
|
|
Test build #28783 has finished for PR 5081 at commit
|
|
Also, I'm not sure what the failed tests are about. |
|
Test build #28785 has finished for PR 5081 at commit
|
|
What's the use case for comparing matrices for equality? I think it's rarer than for vectors. Is it just for testing, mostly? |
|
The hashCode implementation was taken from Effective Java: http://stackoverflow.com/questions/10915309/need-explanation-for-hashcode-example-in-effective-java-textbook
@srowen It may help if we implement hashCode and content equals for both vectors and matrices. It is mostly used for testing. |
There was a problem hiding this comment.
Hash numRows and numCols separately.
|
@srowen There are two approaches:
Which do you prefer? |
|
I'm starting to think we should just test if |
|
Okay, let's keep this PR open and could you update the MatrixUDT PR to use |
|
Done already 👍 |
|
Test build #31050 has started for PR 5081 at commit
|
|
@mengxr @MechCoder what is the status on this PR? It seems to fairly outdated at this point. Should we move forward or close it? |
|
Please do not. We just had a discussion about this yesterday. |
|
Test build #35250 has finished for PR 5081 at commit
|
|
Test build #35299 has finished for PR 5081 at commit
|
|
Test build #35303 has finished for PR 5081 at commit
|
|
There seems to be a unrelated whitespace error in L30 in |
|
Yep, we're fixing it now via a hotfix. |
|
should be fixed now. retest this please |
|
Test build #35305 has finished for PR 5081 at commit
|
Implementing methods equals hashcode and equals for Matrix